/**
 * 在地图上标注项目信息
 * 数据格式如下：
 *
 *   projectData=[
 *       {
 *            coords: [120.137779,30.325564],
  *           proName: '大运河',
  *           status: 1
  *        }
  *     ]
 * @param projectData
 */
function drawProjectPoint(projectData,bmap){
    var buildingIcon = new BMap.Icon("../imgs/weizhi-green.png", new BMap.Size(20, 20))
    var completeIcon = new BMap.Icon("../imgs/weizhi-yellow.png", new BMap.Size(20, 20))
    var stopIcon = new BMap.Icon("../imgs/weizhi-red.png", new BMap.Size(20, 20))
    for(var i = 0;i<projectData.length;i++){
        var icon = buildingIcon;
        var point = new BMap.Point(projectData[i].coords);
        if(projectData[i].staus==1){
            icon = buildingIcon;
        }else if (projectData[i].staus==2){
            icon = completeIcon;
        }else (projectData[i].staus == 3 )
        {
            icon = stopIcon;
        }
        var marker = new BMap.Marker(point,{icon:icon});        // 创建标注
        bmap.addOverlay(marker1);
    }
}

// function addClickHandler(content,label){
//     label.addEventListener("click",function(e){
//         openInfo(content,e)}
//     );
// }
// function openInfo(content,e){
//     var p = e.target;
//     var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
//     var infoWindow = new BMap.InfoWindow(content,opts);  // 创建信息窗口对象
//     map.openInfoWindow(infoWindow,point); //开启信息窗口
// }
